package com.lankystar.logistucs.spring.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="cargo")
public class Cargo {
/**
 * ID、件数、重、总提单号、分单号、上传pdf、地址、一级订单、时间戳、是否删除
 */
	private int cargoId;
	private long count;
	private double heavy;
	private String totalOrderNu;
	private String pointOrderNu;
	private String uploadPdf;
	private Address address;
	private OneOrder oneOrder;
	private User user;//创建数据的人
	private Company fleet;//运输队
	private Company broker;//报关行
	private long createTime;
	private int remove;//0未删除、1删除
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getCargoId() {
		return cargoId;
	}
	public void setCargoId(int cargoId) {
		this.cargoId = cargoId;
	}
	public long getCount() {
		return count;
	}
	public void setCount(long count) {
		this.count = count;
	}
	public double getHeavy() {
		return heavy;
	}
	public void setHeavy(double heavy) {
		this.heavy = heavy;
	}
	public String getTotalOrderNu() {
		return totalOrderNu;
	}
	public void setTotalOrderNu(String totalOrderNu) {
		this.totalOrderNu = totalOrderNu;
	}
	public String getPointOrderNu() {
		return pointOrderNu;
	}
	public void setPointOrderNu(String pointOrderNu) {
		this.pointOrderNu = pointOrderNu;
	}
	public String getUploadPdf() {
		return uploadPdf;
	}
	public void setUploadPdf(String uploadPdf) {
		this.uploadPdf = uploadPdf;
	}
	@ManyToOne
	@JoinColumn(name="address_Id")
	public Address getAddress() {
		return address;
	}
	public void setAddress(Address address) {
		this.address = address;
	}
	@ManyToOne
	@JoinColumn(name="oneOrder_Id")
	public OneOrder getOneOrder() {
		return oneOrder;
	}
	public void setOneOrder(OneOrder oneOrder) {
		this.oneOrder = oneOrder;
	}
	public long getCreateTime() {
		return createTime;
	}
	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}
	public int getRemove() {
		return remove;
	}
	public void setRemove(int remove) {
		this.remove = remove;
	}
	@ManyToOne
	@JoinColumn(name="user_Id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne
	@JoinColumn(name="fleet_Id")
	public Company getFleet() {
		return fleet;
	}
	public void setFleet(Company fleet) {
		this.fleet = fleet;
	}
	@ManyToOne
	@JoinColumn(name="broker_Id")
	public Company getBroker() {
		return broker;
	}
	public void setBroker(Company broker) {
		this.broker = broker;
	}
	
	
	
}
